    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-1"
                    aria-expanded="false">
                   <span class="sr-only"><%= locals.title %></span>
                   <span class="icon-bar"></span>
                   <span class="icon-bar"></span>
                   <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/index=1">Eblog</a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="navbar-1">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="#">首页 <span class="sr-only">(current)</span></a></li>
                    <li><a href="#">标签</a></li>
                    <li><a href="#">分类</a></li>
                    <li><a href="#">关于</a></li>
                    <!-- <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="#">Action</a></li>
                            <li><a href="#">Another action</a></li>
                            <li><a href="#">Something else here</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">Separated link</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">One more separated link</a></li>
                        </ul>
                    </li> -->
                </ul>
                    <% if (user) { %>
                      <p class="navbar-text navbar-right"><a data-toggle="modal" data-target="#post" href="#" class="navbar-link">发表文章</a> 或 <a data-toggle="modal" data-target="#signout" href="#" class="navbar-link">退出</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
                    <% } else { %>
                      <p class="navbar-text navbar-right"><a data-toggle="modal" data-target="#signin" href="#" class="navbar-link">登录</a> 或 <a data-toggle="modal" data-target="#signup" href="#" class="navbar-link">注册</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
                    <% } %>
                <!--<li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="#">Action</a></li>
                            <li><a href="#">Another action</a></li>
                            <li><a href="#">Something else here</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">Separated link</a></li>
                        </ul>
                    </li> -->

            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>


<!--发表文章或退出-->

    <div class="row">
        <div class="col-md-4"></div>
        <div class="col-md-4">
            <!-- Modal  1-->
            <div class="modal fade" id="post" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">

                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel">发表文章</h4>
                        </div>

                        <div class="modal-body">

                            <!-- 发表文章 -->
                            <form class="form-horizontal" action="/article" method="post" id='post_article'>
                                <div class="form-group">
                                    <label for="title" class="col-sm-2 control-label">标题</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="title" placeholder="文章标题" name="title">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="summary" class="col-sm-2 control-label">摘要</label>
                                    <div class="col-sm-10">
                                        <textarea class="form-control" id="summary" rows="2" placeholder="文章摘要" name="summary"></textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="content" class="col-sm-2 control-label">正文</label>
                                    <div class="col-sm-10">
                                        <textarea class="form-control" id="content" rows="18" placeholder="正文内容" name="content"></textarea>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <!-- 发表终止 -->
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <button type="submit" class="btn btn-primary" form="post_article">发布</button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- Modal 1 终止 -->
            <!-- Modal 2 -->
            <div class="modal fade" id="signout" tabindex="-1" role="dialog" aria-labelledby="退出">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="退出">退出</h4>
                        </div>
                        <div class="modal-body">
                        <h4> 你确定要退出吗？</h4>
                        </div>
                        <!-- 登录终止 -->
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <a href="/signout">
                                <button type="submit" class="btn btn-primary" >退出</button>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
            <!-- Modal 2 终止 -->
        </div>
        <div class="col-md-4"></div>
    </div>


    <!-- 登录或注册-->
    <div class="row">
        <div class="col-md-4"></div>
        <div class="col-md-4">

            <!-- Modal -->
            <div class="modal fade" id="signup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel">注册</h4>
                        </div>
                        <div class="modal-body">
                            <!-- 注册 -->
                            <form method="POST" enctype="multipart/form-data" action="/signup" id="signup_form">
                                <div class="form-group">
                                    <label for="username">用户名*</label>
                                    <input type="text" class="form-control" id="username" placeholder="用户名请保持在10个字符以内" name="username">
                                </div>
                                <div class="form-group">
                                    <label for="password">密码*</label>
                                    <input type="password" class="form-control" id="password" placeholder="密码不少于6位" name="password">
                                </div>
                                <div class="form-group">
                                    <label for="repassword">重复密码*</label>
                                    <input type="password" class="form-control" id="repassword" placeholder="重复密码" name="repassword">
                                </div>
                                <div class="form-group">
                                    <label for="email">邮箱*</label>
                                    <input type="email" class="form-control" id="email" placeholder="邮箱" name="email">
                                </div>
                                <div class="form-group">
                                    <label for="icon">头像*</label>
                                    <input type="file" id="icon" name="icon">
                                    <p class="help-block">上传的头像图片请保持在 "120x120" 像素以内</p>
                                </div>
                                <div class="form-group">
                                    <label for="profile">简介</label>
                                    <textarea class="form-control" id="profile" rows="3" placeholder="一句话展示你自己，不要多于30个字" name="profile"></textarea>
                                </div>
                                <!--
                                    <div class="checkbox">
                                        <label>
                                          <input type="checkbox"> Check me out
                                          </label>
                                    </div>
                                    <button type="submit" class="btn btn-default">Submit</button> -->
                            </form>
                        </div>
                        <!-- 注册终止 -->
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <button type="submit" class="btn btn-primary" form="signup_form">注册</button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- Modal 终止 -->
            <!-- Modal -->
            <div class="modal fade" id="signin" tabindex="-1" role="dialog" aria-labelledby="signin">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="signin">登录</h4>
                        </div>
                        <div class="modal-body">
                            <!-- 登录 -->
                            <form action="/signin" method="POST" id="signin_form">
                                <div class="form-group">
                                    <label for="username">用户名</label>
                                    <input type="text" class="form-control" id="username" placeholder="填写注册时使用的用户名" name="username">
                                </div>
                                <div class="form-group">
                                    <label for="password">密码</label>
                                    <input type="password" class="form-control" id="password" placeholder="填写你的登录密码" name="password">
                                </div>

                                <!-- <div class="form-group">
                                        <label for="exampleInputFile">File input</label>
                                        <input type="file" id="exampleInputFile">
                                        <p class="help-block">Example block-level help text here.</p>
                                    </div>
                                    <div class="checkbox">
                                        <label>
                                          <input type="checkbox"> Check me out
                                          </label>
                                    </div> -->
                                <!-- <button type="submit" class="btn btn-default">Submit</button> -->
                            </form>
                        </div>
                        <!-- 登录终止 -->
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <button type="submit" class="btn btn-primary" form="signin_form" >登录</button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- Modal 终止 -->

        </div>
        <div class="col-md-4"></div>       
    </div>